package com.example.unisys.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.unisys.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Repository
public interface UserMapper extends BaseMapper<User> {

     String getPassWord(@Param("username") String username);

     User getInfo(@Param("username") String username);

     //int getUserType(@Param("username") String username);

     int updateip(@Param("ip") String ip,@Param("user_id")int user_id);

     int updatetime(@Param("user_id")int user_id,@Param("prev_time") String prev_time);


     List<User> getAdminsBySchool(Map map);

     Integer getAdminSumBySchool(Map map);

     Integer insertSelective(User user);

     int update(User user);

     int delete(@Param("user_id")int user_id);

    List<User> getAdmins(HashMap<String, Object> hs);

     int getAdminSumBySystem(HashMap<String, Object> hs);

    String getPWDbyCondition(HashMap<String, Object> hs);
}
